from fastapi import APIRouter
from typing import Union, Optional

app2 = APIRouter()


@app2.get("/jobs/{kd}")
async def jobs(kd, xl: Union[str, None] = None, gj: Optional[str] = None, qt=None):  # 没有默认值，前端必须输入
    return {
        "kd": kd,
        "xl": xl,
        "gj": gj,
        "qt": qt
    }
